//
//  HSYHelpViewController.m
//  HSY
//
//  Created by 陈浩 on 2017/4/5.
//  Copyright © 2017年 金开门. All rights reserved.
//

#import "HSYHelpViewController.h"
#import "HexColor.h"

@interface HSYHelpViewController ()

@end

@implementation HSYHelpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.titleButton setTitle:@"帮助" forState:UIControlStateNormal];
    self.view.backgroundColor = [UIColor whiteColor];

    NSURL *url =[NSURL URLWithString:@"http://hsy.qianbaojiajia.com/help.html"];
    [self loadURL:url];


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)webView:(WKWebView *)webView didFailNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error {
    [self showMessage:@"加载失败"];
    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}

- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation {
    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
    
    [self performSelector:@selector(setupWebViewBackgroupColor) withObject:nil afterDelay:0.05];
}

- (void)setupWebViewBackgroupColor{
    self.webView.scrollView.backgroundColor = [UIColor colorWithHexString:@"#5C6367"];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
